Tcl Source Code

Check-in [479fc6ad0d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Unbreak (gcc) build
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | tip-716
Files: files | file ages | folders
SHA3-256: 479fc6ad0dff8cddd774b69320221b95dfd050b6f4e64b81d934ea8e471b1306
User & Date: jan.nijtmans 2025-04-29 08:51:25.925
Context
2025-05-21
00:53
Update docs check-in: dc2007a08c user: apnadkarni tags: tip-716
2025-04-29
11:13
Rebase to tip-716 Closed-Leaf check-in: fd647584e8 user: jan.nijtmans tags: tclsh90c.exe-for-tip-716-compatibility
08:51
Unbreak (gcc) build check-in: 479fc6ad0d user: jan.nijtmans tags: tip-716
2025-04-28
11:30
Fix cmdAH tests. See comments below.

Tcl_GetEncodingForUser will not be available until 9.1 for stu... check-in: 17bd2a7748 user: apnadkarni tags: tip-716

Changes
Unified Diff Ignore Whitespace Patch
Changes to win/tclWinInit.c.
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
 *	Pointer to OSVERSIONINFOW structure.
 */
static const OSVERSIONINFOW *TclpGetWindowsVersion(void)
{
    static INIT_ONCE osInfoOnce = INIT_ONCE_STATIC_INIT;
    OSVERSIONINFOW *osInfoPtr = NULL;
    BOOL result = InitOnceExecuteOnce(
	&osInfoOnce, TclpGetWindowsVersionOnce, NULL, &osInfoPtr);
    return result ? osInfoPtr : NULL;
}


/*
 *---------------------------------------------------------------------------
 *







|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
 *	Pointer to OSVERSIONINFOW structure.
 */
static const OSVERSIONINFOW *TclpGetWindowsVersion(void)
{
    static INIT_ONCE osInfoOnce = INIT_ONCE_STATIC_INIT;
    OSVERSIONINFOW *osInfoPtr = NULL;
    BOOL result = InitOnceExecuteOnce(
	&osInfoOnce, TclpGetWindowsVersionOnce, NULL, (LPVOID *)&osInfoPtr);
    return result ? osInfoPtr : NULL;
}


/*
 *---------------------------------------------------------------------------
 *
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
    return Tcl_DStringValue(bufPtr);
}

const char *
Tcl_GetEncodingNameFromEnvironment(
    Tcl_DString *bufPtr)
{
    OSVERSIONINFOW *osInfoPtr = TclpGetWindowsVersion();
    /*
     * TIP 716 - for Build 18362 or higher, force utf-8. Note Windows build
     * numbers always increase, so no need to check major / minor versions.
     */
    if (osInfoPtr && osInfoPtr->dwBuildNumber >= 18362) {
	Tcl_DStringInit(bufPtr);
	Tcl_DStringAppend(bufPtr, "utf-8", 5);







|







471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
    return Tcl_DStringValue(bufPtr);
}

const char *
Tcl_GetEncodingNameFromEnvironment(
    Tcl_DString *bufPtr)
{
    const OSVERSIONINFOW *osInfoPtr = TclpGetWindowsVersion();
    /*
     * TIP 716 - for Build 18362 or higher, force utf-8. Note Windows build
     * numbers always increase, so no need to check major / minor versions.
     */
    if (osInfoPtr && osInfoPtr->dwBuildNumber >= 18362) {
	Tcl_DStringInit(bufPtr);
	Tcl_DStringAppend(bufPtr, "utf-8", 5);